An imaging device having an automatic focus adjusting function is widely used, such as a digital camera. Methods of the automatic focus adjusting (hereinafter referred to as AF) include an active type and a passive type. In the active type, infrared rays or ultrasonic waves are applied to an object to measure a distance according to a focusing position of the reflected light or time or the like until return of the reflected light. In the passive type, an object image obtained through the taking lens or the like is used to detect a focal length. Known AF functions of the passive type include a contrast detection method and a phase difference detection method. The contrast detection method adjusts the focus so as to maximize contrast of the image of an entire frame or in a specified area. The phase difference detection method adjusts the focus according to a relationship between image data output by two image sensors disposed with parallax (phase difference).
Recently, the imaging device for operating in the phase difference detection method with one image sensor at the time of the AF has been known, in which pixels (hereinafter referred to as phase difference pixels) structurally asymmetric in the horizontal (or vertical) direction are incorporated in the pixel arrangement of the one image sensor. The phase difference pixels, as described above, are pixels structurally asymmetric, and have a different characteristic such as a lower sensitivity than normal pixels. Portions of the phase difference pixels may be dim in the object image or is colored in a form of noise. In view of this, correction of data of the phase difference pixels in the object image is known in relation of the imaging device in which the image sensor with the phase difference pixels is used.
Two methods are known as correction of data of the phase difference pixels, namely, average correction and gain correction. The average correction is a correction method in which pixel values (brightness) of standard pixels adjacent to the periphery of the phase difference pixels are averaged and used as the pixel values of the phase difference pixels (Patent Document 1). The gain correction is the correction method for multiplying the pixel values of the phase difference pixels by a predetermine gain to increase the pixel values of the phase difference pixels (Patent Documents 1 and 2).